import request from '@/utils/request'

// 查询角色权限列表
export function listRole_perm(query) {
  return request({
    url: '/user/role_perm/list',
    method: 'get',
    params: query
  })
}

// 查询角色权限详细
export function getRole_perm(rolePermId) {
  return request({
    url: '/user/role_perm/' + rolePermId,
    method: 'get'
  })
}

// 新增角色权限
export function addRole_perm(data) {
  return request({
    url: '/user/role_perm',
    method: 'post',
    data: data
  })
}

// 修改角色权限
export function updateRole_perm(data) {
  return request({
    url: '/user/role_perm',
    method: 'put',
    data: data
  })
}

// 删除角色权限
export function delRole_perm(rolePermId) {
  return request({
    url: '/user/role_perm/' + rolePermId,
    method: 'delete'
  })
}
